package com.ruoyi.system.domain;

import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 优惠券对象 coupons
 * 
 * @author zdk
 * @date 2025-05-12
 */
public class Coupons extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** id */
    private Long id;

    /** 优惠券标题 */
    @Excel(name = "优惠券标题")
    private String title;

    /** 优惠券价格 */
    @Excel(name = "优惠券价格")
    private BigDecimal price;

    /** 抵扣时长(小时) */
    @Excel(name = "抵扣时长(小时)")
    private Long duration;

    /** 过期日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "过期日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date expireDate;

    /** 使用条款 */
    @Excel(name = "使用条款")
    private String terms;

    /** 时段限制，如日场/夜场 */
    @Excel(name = "时段限制，如日场/夜场")
    private String periodLimit;

    /** 是否为模板券：true-是，false-否 */
    @Excel(name = "是否为模板券：true-是，false-否")
    private Integer isTemplate;

    /** 库存数量，-1表示不限，仅模板券有效 */
    @Excel(name = "库存数量，-1表示不限，仅模板券有效")
    private Long stock;

    /** 券状态：0-已使用/下架，1-未使用/正常 */
    @Excel(name = "券状态：0-已使用/下架，1-未使用/正常")
    private Long status;

    /** 该券可预定的房间类型 */
    @Excel(name = "该券可预定的房间类型")
    private Long roomType;

    /** 购买用户ID，NULL表示模板券 */
    private Long userId;

    /** 关联的模板券ID */
    private Long templateId;

    /** 剩余可用次数 */
    @Excel(name = "剩余可用次数")
    private Long remainTimes;

    /** 购买时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "购买时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date purchaseTime;

    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date createdAt;

    /** 更新时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date updatedAt;

    /** 优惠卷码 */
    @Excel(name = "优惠卷码")
    private String verifyCode;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }

    public void setTitle(String title) 
    {
        this.title = title;
    }

    public String getTitle() 
    {
        return title;
    }

    public void setPrice(BigDecimal price) 
    {
        this.price = price;
    }

    public BigDecimal getPrice() 
    {
        return price;
    }

    public void setDuration(Long duration) 
    {
        this.duration = duration;
    }

    public Long getDuration() 
    {
        return duration;
    }

    public void setExpireDate(Date expireDate) 
    {
        this.expireDate = expireDate;
    }

    public Date getExpireDate() 
    {
        return expireDate;
    }

    public void setTerms(String terms) 
    {
        this.terms = terms;
    }

    public String getTerms() 
    {
        return terms;
    }

    public void setPeriodLimit(String periodLimit) 
    {
        this.periodLimit = periodLimit;
    }

    public String getPeriodLimit() 
    {
        return periodLimit;
    }

    public void setIsTemplate(Integer isTemplate) 
    {
        this.isTemplate = isTemplate;
    }

    public Integer getIsTemplate() 
    {
        return isTemplate;
    }

    public void setStock(Long stock) 
    {
        this.stock = stock;
    }

    public Long getStock() 
    {
        return stock;
    }

    public void setStatus(Long status) 
    {
        this.status = status;
    }

    public Long getStatus() 
    {
        return status;
    }

    public void setRoomType(Long roomType) 
    {
        this.roomType = roomType;
    }

    public Long getRoomType() 
    {
        return roomType;
    }

    public void setUserId(Long userId) 
    {
        this.userId = userId;
    }

    public Long getUserId() 
    {
        return userId;
    }

    public void setTemplateId(Long templateId) 
    {
        this.templateId = templateId;
    }

    public Long getTemplateId() 
    {
        return templateId;
    }

    public void setRemainTimes(Long remainTimes) 
    {
        this.remainTimes = remainTimes;
    }

    public Long getRemainTimes() 
    {
        return remainTimes;
    }

    public void setPurchaseTime(Date purchaseTime) 
    {
        this.purchaseTime = purchaseTime;
    }

    public Date getPurchaseTime() 
    {
        return purchaseTime;
    }

    public void setCreatedAt(Date createdAt) 
    {
        this.createdAt = createdAt;
    }

    public Date getCreatedAt() 
    {
        return createdAt;
    }

    public void setUpdatedAt(Date updatedAt) 
    {
        this.updatedAt = updatedAt;
    }

    public Date getUpdatedAt() 
    {
        return updatedAt;
    }

    public void setVerifyCode(String verifyCode) 
    {
        this.verifyCode = verifyCode;
    }

    public String getVerifyCode() 
    {
        return verifyCode;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("title", getTitle())
            .append("price", getPrice())
            .append("duration", getDuration())
            .append("expireDate", getExpireDate())
            .append("terms", getTerms())
            .append("periodLimit", getPeriodLimit())
            .append("isTemplate", getIsTemplate())
            .append("stock", getStock())
            .append("status", getStatus())
            .append("roomType", getRoomType())
            .append("userId", getUserId())
            .append("templateId", getTemplateId())
            .append("remainTimes", getRemainTimes())
            .append("purchaseTime", getPurchaseTime())
            .append("createdAt", getCreatedAt())
            .append("updatedAt", getUpdatedAt())
            .append("verifyCode", getVerifyCode())
            .toString();
    }
}
